package by.ostrovsky.webhousingsystem.controller.userrequest;

import java.util.List;

import org.apache.log4j.Logger;

import by.ostrovsky.webhousingsystem.controller.IOperateController;
import by.ostrovsky.webhousingsystem.dao.DAOFactory;
import by.ostrovsky.webhousingsystem.dao.implementation.idao.IOperateDAO;
import by.ostrovsky.webhousingsystem.exception.CommonException;
import by.ostrovsky.webhousingsystem.hibernate.entity.UserRequest;

public class DeleteHousingRequestController implements IOperateController<UserRequest, Boolean>{
	private static Logger logger = Logger.getLogger(DeleteHousingRequestController.class);
	
	@Override
	public Boolean delete(List<UserRequest> list) throws CommonException {
		DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.MySQL);
		IOperateDAO<List<UserRequest>,Boolean> dao = factory.getHousingRequestDAO();
		
		try{
			return dao.delete(list);
		}
		catch(Exception e){
			logger.error(e);
		}
		return null;
	}
	
	@Override
	public List<UserRequest> get() throws CommonException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Boolean set(List<UserRequest> list) throws CommonException {
		// TODO Auto-generated method stub
		return null;
	}


}
